<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>视频直播</title>
  <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath }/css/video1.css" />
  <script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
  <script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script> 
  
  <style>
.button1{background:none;background-image:url(../images/enlarge.png);border:none;width:100px;height:40px;}
</style>

</head>
<body>
	  <div class="body">
	      <!-- <div id="video">
             <video id="myPlayer" poster="" controls playsInline webkit-playsinline autoplay>
            <source src="rtmp://rtmp.open.ys7.com/openlive/79eba207c7ec4597b7ecb9c3a8cd8a71" type="rtmp/flv" />
            <source src="http://hls.open.ys7.com/openlive/79eba207c7ec4597b7ecb9c3a8cd8a71.m3u8" type="application/x-mpegURL" />
         </video>   -->
           </div>
          
          <div id="buttonLine">
          
              <button id="enlarge"></button> 
              <button id="narrow"></button>
              <button id="up"></button>
              <button id="down"></button>
              <button id="left"></button>
              <button id="right"></button>
                  
         </div>
         
        <div id="buttonLine1">
          
              <textarea  id="text1" placeholder="text1"></textarea > 
              <textarea  id="text2" placeholder="text2"></textarea >
              <textarea  id="text3" placeholder="text3"></textarea >
              <textarea  id="text4" placeholder="text4"></textarea >
              <textarea  id="text5" placeholder="text5"></textarea >
              
          </div>

          
            
           
      
 
    <!--   <video id="myPlayer" poster="" controls playsInline webkit-playsinline autoplay>
            <source src="rtmp://rtmp.open.ys7.com/openlive/f01018a141094b7fa138b9d0b856507b" type="rtmp/flv" />
            <source src="http://hls.open.ys7.com/openlive/f01018a141094b7fa138b9d0b856507b.m3u8" type="application/x-mpegURL" />
         </video>   -->   
         </div>
         
         
          <script>  var player = new EZUIPlayer('myPlayer'); </script>
          <script>
          var accessToken="at.4nlk0xfo3u7tcjaf5eieo60u23re8kub-8hdu73zeoq-0n7bfxe-kkejrbr1z";
          var deviceSerial="809493562";
          var channelNo="1";
          
$(document).ready(function(){
	$("#enlarge").mousedown(function(){
		$.post("https://open.ys7.com/api/lapp/device/ptz/start?accessToken="+accessToken+"&deviceSerial="+deviceSerial+"&channelNo="+channelNo+"&direction=8&speed=1",{
		 },
		function(data,status){
			alert("数据: \n" + data + "\n状态: " + status);
		});
	});
	$("#narrow").mousedown(function(){
		$.post("https://open.ys7.com/api/lapp/device/ptz/start?accessToken="+accessToken+"&deviceSerial="+deviceSerial+"&channelNo="+channelNo+"&direction=9&speed=1",{
		 },
		function(data,status){
			alert("数据: \n" + data + "\n状态: " + status);
		});
	});
	$("#up").mousedown(function(){
		$.post("https://open.ys7.com/api/lapp/device/ptz/start?accessToken="+accessToken+"&deviceSerial="+deviceSerial+"&channelNo="+channelNo+"&direction=0&speed=1",{
		 },
		function(data,status){
			alert("数据: \n" + data + "\n状态: " + status);
		});
	});
	$("#down").mousedown(function(){
		$.post("https://open.ys7.com/api/lapp/device/ptz/start?accessToken="+accessToken+"&deviceSerial="+deviceSerial+"&channelNo="+channelNo+"&direction=1&speed=1",{
		 },
		function(data,status){
			alert("数据: \n" + data + "\n状态: " + status);
		});
	});
	$("#left").mousedown(function(){
		$.post("https://open.ys7.com/api/lapp/device/ptz/start?accessToken="+accessToken+"&deviceSerial="+deviceSerial+"&channelNo="+channelNo+"&direction=2&speed=1",{
		 },
		function(data,status){
			alert("数据: \n" + data + "\n状态: " + status);
		});
	});
	$("#right").mousedown(function(){
		$.post("https://open.ys7.com/api/lapp/device/ptz/start?accessToken="+accessToken+"&deviceSerial="+deviceSerial+"&channelNo="+channelNo+"&direction=3&speed=1",{
		 },
		function(data,status){
			alert("数据: \n" + data + "\n状态: " + status); 
		});
	});
	

	$("button").mouseup(function(){
		$.post("https://open.ys7.com/api/lapp/device/ptz/stop?accessToken="+accessToken+"&deviceSerial="+deviceSerial+"&channelNo="+channelNo,{
		 },
			function(data,status){
				alert("数据: \n" + data + "\n状态: " + status);
				
			});
	});

});
</script>
</body>
</html>